<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
>
<script th:inline="javascript">
/*<![CDATA[*/
	$(function() {
	    battcn.admin.menu[[${OP.menuId}]].save = function(obj) {
	  		if($("#menu[[${OP.menuId}]]Form").valid()){
		  		battcn.ajaxJson({url:"/op_save_[[${OP.menuId}]]",data:$('#menu[[${OP.menuId}]]Form').serializeArray()},function(){
		  			battcn.closeWindow();
					$('#admin_menu[[${OP.menuId}]]_datagrid').bootstrapTable('refresh');
	    		});
	  		}
		}
	});
	
/*]]>*/
</script>
<div class="ibox float-e-margins animated fadeInRight">
	<div class="ibox-content">
		<form class="form-horizontal m-t required-validate" th:id="@{menu{menuId}Form(menuId=${OP.menuId})}" method="POST" >
			<input type="hidden" name="id" th:value="${dto?.id}" />
			<div class="form-group">
				<label class="col-sm-3 control-label">角色名称：</label>
				<div class="col-sm-8">
					<input name="name" class="form-control" th:value="${dto?.name}"
						validate="{required:true,messages:{required:'请填写名称'}}" type="text"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">角色代码：</label>
				<div class="col-sm-8" th:if="${dto == null}">
					<input name="code" class="form-control" th:value="${dto?.code}"
						validate="{required:true,messages:{required:'请填写代码'}}" />
				</div>
				<div class="col-sm-8" th:if="${dto?.id}">
					<span style="display: block; margin-top: 6px;" th:text="${dto?.code}"></span>
					<input type="hidden" name="code" class="formText" th:value="${dto?.code}" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="ccomment" name="remark" cols="55" rows="3"
						class="form-control" th:text="${dto?.remark}"></textarea>
				</div>
			</div>
		</form>
	</div>
</div>
</html>